
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>

<head>
	<base href="<%=basePath%>">
	
	<title>物资管理平台启动中心</title>
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="ERP系统">
	<meta http-equiv="description" content="ERP系统">
	
	<link rel='stylesheet' href='module/luckysheet/plugins/css/pluginsCss.css' />
	<link rel='stylesheet' href='module/luckysheet/plugins/plugins.css' />
	<link rel='stylesheet' href='module/luckysheet/css/luckysheet.css' />
	<link rel='stylesheet' href='module/luckysheet/assets/iconfont/iconfont.css' />
	<script src="module/luckysheet/plugins/js/plugin.js"></script>
	<script src="module/luckysheet/luckysheet.umd.js"></script>
</head>

<body>
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:99%;left: 0px;top: 0px;"></div>

<script>
	$(document).ready(function() {
		//配置项
        var options = {
            container: 'luckysheet',
            title: '科目余额表（<%=request.getAttribute("periodName")%>）',
    		lang: 'zh',
    		gridKey: 'glReport',
    		loadUrl: '<%=basePath%>web/gLTable/getGLAccountBalanceTableJson?periodName=<%=request.getAttribute("periodName")%>',
    		showtoolbar: true,
    		showtoolbarConfig: {
    			currencyFormat: false,
    			percentageFormat: false,
    			numberDecrease: false,
    			numberIncrease: false,
    			textRotateMode: false,
				image:false,
				link:false,
    			chart: false,
    			pivotTable: false,
    			conditionalFormat: false,
				dataVerification: false,
    			splitColumn: false,
				protection:false,
				print:false,
				font: false,
    			fontSize: false,
    		},
    		cellRightClickConfig: {
    			copyAs: false,
    			deleteCell: false,
			    rowHeight: false,
			    columnWidth: false,
			    matrix: false,
			    sort: false,
			    filter: false,
			    chart: false,
			    image: false,
			    data: false,
				cellFormat: false
    		},
    		userInfo:'<i style="font-size:16px;color:#ff6a00;" class="fa fa-bar-chart" aria-hidden="true"></i> 赤龙ERP【总账报表】<span style="color:gray">（双击科目名称查询余额明细）</span>',
    		myFolderUrl: '',
    		showstatisticBar: true,
			enableAddRow: false,
			enableAddBackTop: false,
    		sheetFormulaBar: false,
    		showsheetbar: true,
    		hook:{
    			cellEditBefore:function(range){
    				var row = range[0].row[0];
    				var column = range[0].column[0];
    				if($.isNumeric(row)&&$.isNumeric(column)&&parseInt(column)==1&&parseInt(row)>1){
    					var subjectCode = window.luckysheet.getCellValue(row, column-1);
    					if(subjectCode!=null){
    						window.open("web/gLTable/getGLAccountBalanceDetailTable?subjectCode="+subjectCode+"&periodName=<%=request.getAttribute("periodName")%>");
    					}
    				}
				},
			},
        }
        luckysheet.create(options);
	});
</script>      

</body>
</html> 